package com.nyist.controller;

import com.nyist.pojo.User;
import com.nyist.result.CommonResult;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import java.util.UUID;

@RestController
public class ProviderController8004 {

    @Value("${server.port}")
    private String port;

    @GetMapping(value = "/provider/hello/{name}")
    public CommonResult hello(@PathVariable("name") String name){
        User user = new User(11,name,18);
        System.out.println("进入提供者：进行提供服务");
        return new CommonResult("200","success port:"+port+"  "+ UUID.randomUUID().toString(),user);
    }
}
